package com.edu.exam.enums.examination.paper;

/**
 * OMR评估方法枚举
 *
 * @author System
 * @version 1.0.0
 */
public enum OmEvaluationMethod {
    AUTOMATIC("AUTOMATIC", "自动评估"),
    SEMI_AUTOMATIC("SEMI_AUTOMATIC", "半自动评估"),
    MANUAL("MANUAL", "人工评估"),
    HYBRID("HYBRID", "混合评估"),
    MACHINE_LEARNING("MACHINE_LEARNING", "机器学习"),
    RULE_BASED("RULE_BASED", "规则引擎"),
    STATISTICAL("STATISTICAL", "统计分析"),
    PATTERN_RECOGNITION("PATTERN_RECOGNITION", "模式识别"),
    FUZZY_LOGIC("FUZZY_LOGIC", "模糊逻辑"),
    NEURAL_NETWORK("NEURAL_NETWORK", "神经网络");

    private final String code;
    private final String description;

    OmEvaluationMethod(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static OmEvaluationMethod fromCode(String code) {
        for (OmEvaluationMethod method : OmEvaluationMethod.values()) {
            if (method.code.equals(code)) {
                return method;
            }
        }
        throw new IllegalArgumentException("Unknown OMR evaluation method code: " + code);
    }

    @Override
    public String toString() {
        return description;
    }
}
